<include file="Public:header" />
<include file="Public:left" />

<style>
td,th{text-align:center;}
h2{line-height: 42px;}
</style>
<section>
	<div class="page_title">
	<h2 class="fl">中奖记录列表</h2>
	<form action="" >
		<input type="text" class="page_title_input" name="keyword" placeholder="会员名" value="{$keyword?$keyword:'';}">
		<input  class="page_title_submit" type="submit" value="搜索">
		<input  class="btn" type="submit" name="export" value="导出excel" />
	</form>
	</div>
	<table class="table">
		<tr>
        <th>中奖记录id</th>
		<th>会员名称</th>
		<th>中奖时间</th>
        <th>奖品名称</th>
        <th>活动名称</th>
        <th>状态</th>
        <th>操作</th>
		</tr>
		<volist name="data" id="vo">
		<tr>
		<td>{$vo.id}</td>
        <td>{$vo.nickname}</td>
        <td>{$vo.time|date="Y-m-d H:i:s",###}</td>
        <td>{$vo.name}</td>
        <td>{$vo.a_name}</td>
        <td>
            <switch name="$vo.status">
                <case value="0">开奖中</case>
                <case value="1">中奖成功</case>
                <case value="-1">中奖失败</case>
            </switch>
        </td>
		<td>
			<a onclick="return confirm('确认中奖成功？')" href="{:url('activity/recordy',array('id'=>$vo['id']))}" class="inner_btn">中奖成功</a>
			<a onclick="return confirm('确认中奖失败？')" href="{:url('activity/recordn',array('id'=>$vo['id']))}"  class="inner_btn" >中奖失败</a>
		</td>
		</tr>
		</volist>
	</table>
	{$data->render()}
</section>
	<script>
	$(document).ready(function(){
		$(".admin_tab li a").click(function(){
		var liindex = $(".admin_tab li a").index(this);
		$(this).addClass("active").parent().siblings().find("a").removeClass("active");
		$(".admin_tab_cont").eq(liindex).fadeIn(150).siblings(".admin_tab_cont").hide();
		});
		});
	</script>
</body>
</html>
